﻿Module PaperApplication

    ''' <summary>
    ''' This console application calculates the most cost efficient paper solution for the consumer.
    ''' </summary>
    ''' <remarks></remarks>
    Sub Main()

        Dim sheets As Double
        Dim remaining As Double
        Dim num1000 As Double = 30
        Dim num500 As Double = 20
        Dim num100 As Double = 5.5

        'INPUT 
        Console.WriteLine("Enter number of sheets of paper needed: ")
        Double.TryParse(Console.ReadLine, sheets)

        'PROCESSING 
        Dim sheet1 As Double = 0.1
        Dim sheets100 As Double = 5.5
        Dim sheets500 As Double = 20
        Dim sheets1000 As Double = 30

        If sheets Mod 1000 >= 645 Then remaining = num1000
        If sheets Mod 500 >= 335 Then remaining = num500
        If sheets Mod 100 >= 55 Then remaining = num100

        Dim remaining645 As Double
        Dim remaining335 As Double
        Dim remaining55 As Double

        If sheets Mod 1000 < 645 Then remaining645 = sheets Mod 1000
        If sheets Mod 500 < 335 Then remaining335 = sheets Mod 500
        If sheets Mod 100 < 55 Then remaining55 = sheets Mod 100


        Console.WriteLine("Total cost: " & remaining)
        Console.ReadLine()
    End Sub
End Module
